package cn.stylefeng.guns.sys.core.util;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

/**
 * json的转化工具
 * @Author : xiaofei
 * @Date: 2019/6/19
 */
public class JsonUtil {

    public static String toJson(Object object) {
        GsonBuilder gsonBuilder = new GsonBuilder();
        gsonBuilder.setPrettyPrinting();
        Gson gson = gsonBuilder.create();
        return gson.toJson(object);
    }

}
